program dimainfo2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
  var: a,s:array of integer;
       q,w,e,z,x,c,r:integer;
begin
  readln(q);
  e:=0;
  r:=0;
  x:=0;
for w:=1 to q do
  begin;
  read(a[w]);
  read(s[w]);
  end;
s[q+1]:=s[1];
a[q+1]:=a[1];
for w:=1 to q do
 begin;
 e:=s[w]-(s[w+1]-s[w])/(a[w+1]-a[w])*a[w];
 r:= (s[w+1]-s[w])/(a[w+1]-a[w]);
 for z:= 1 to q do
  if s[z]<a[z]*r +e then
  x:=x+1;
 end;

if (x=0) or (x=q) then
writeln('YES');
else
writeln('NO');
end.
